﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WiseLinkWPF.Windows.Controls.GridView;
using WiseLinkWPF.Windows.Controls;
using System.Printing;
using GridViewColumn = WiseLinkWPF.Windows.Controls.GridViewColumn;
using CCF20Model;
using System.Collections;

namespace CCF20Module
{
    /// <summary>
    /// Interaction logic for MyPrint.xaml
    /// </summary>
    public partial class MyPrint : Window
    {
        public GridViewDataControl MySource { get; set; }
        RadGridView myGrid;
        public MyPrint()
        {
            InitializeComponent();
            myGrid = new RadGridView();
        }
        public void PrintPreview()
        {
            DocumentViewer documentViewer = new DocumentViewer();
            PrintExtensions.ToPrintFriendlyGrid(MySource,myGrid);
            //documentViewer.Document = PrintExtensions.ToFixedDocument(myGrid, new PrintDialog());
            this.Content = PrintExtensions.ToFixedDocument(myGrid, new PrintDialog());

        }


    }
}
